package com.five.welcome.dao;

import com.five.welcome.entity.Studentinfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.five.welcome.entity.statistic.GenderOfStudentCount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Ywt
 */
@Mapper
public interface StudentinfoMapper extends BaseMapper<Studentinfo> {

    //统计学生信息男女人数
    @Select("SELECT s_gender,count(*) as total FROM studentinfo GROUP BY s_gender")
    List<GenderOfStudentCount> GenderOfStudentCount();
}
